package design_model;

//接口
interface school{
    void come();
}

//实现类
class student implements  school{
    @Override
    public void come() {
        System.out.println("进校门");
    }
}

//代理类同时实现接口school
class static_proxy implements school{

    //被代理对象
    private  school stu;

    public static_proxy() {
        stu = new student();
    }

    @Override
    public void come() {
        System.out.println("健康码查验");
        stu.come();
    }

}
public class StaticProxyTest {
    public static void main(String[] args) {
        school p = new static_proxy();
        p.come();
    }
}